Path Parameters
Unique identifier of the agent to invoke (UUID format)
Request Body
Agent execution input containing the task details
Desired output format. Valid values:
text | json | markdownDefault: texttext: Plain text responsejson: Structured JSON output (use withoutput_schemafor validation)markdown: Formatted markdown response
JSON Schema to validate and structure the agent’s output. When provided with
output_format: "json", the agent will return data conforming to this schema.Example:Enable detailed event streaming for granular progress tracking. When
true, emits events for tool calls, intermediate steps, and execution progress.Default: falseRecommended: Set to true for this endpoint to get maximum visibility into agent execution.Additional context to guide the agent’s behavior. Use this to specify tone, audience, constraints, or background information.Example:
"This is for executive leadership. Use professional tone and focus on business impact."Description of the expected output format, length, or structure. Helps guide the agent to produce the desired result.Example:
"A 500-word summary with 3 key recommendations and supporting data."Human-readable title for the task. Useful for identification and organization in task lists.Example:
"Real-time Data Analysis"UUID of the parent task if this is a sub-task. Used for multi-agent workflows and task hierarchies.Example:
"550e8400-e29b-41d4-a716-446655440000"UUID of the agent that triggered this task. Used for tracking agent-to-agent delegation.Example:
"7c9e6679-7425-40de-944b-e07fc1f90ae7"Custom metadata to attach to the task. Any valid JSON object. Useful for tracking, routing, or application-specific data.Example:
Array of Model Context Protocol (MCP) server configurations to use during execution. Enables integration with external tools and services.Example:
Identifier for the source system or application that created this task. Useful for analytics and debugging.Example:
"chat-widget" | "mobile-app" | "websocket-client"Example Requests
Basic Streaming Request
With Detailed Event Streaming
File Processing with Progress Tracking
Structured Output with Streaming
Response Format
This endpoint returns Server-Sent Events (SSE) withContent-Type: text/event-stream
Event Stream Format
Events are sent in SSE format:Event Types
Sent when the task begins execution
Sent for each piece of generated content
Sent when the task finishes successfully
Sent if an error occurs during execution
Example: JavaScript Client
Notes
- The agent must have
deployment_type: serverlessor be a running container - Connection stays open until task completes or errors
- Set appropriate timeout values for long-running tasks
- Handle connection errors and implement retry logic
See Also
- [Invoke Agent (Sync)](/API reference/v1/agents/invoke-sync) - For quick tasks with immediate results
- [Invoke Agent (Async)](/API reference/v1/agents/invoke-async) - For long-running tasks with polling
- [Get Task](/API reference/v1/tasks/get-task) - Retrieve task details after streaming completes
Authorizations
API Key for authentication
Path Parameters
Body
application/json
Available options:
text, markdown, json Response
Successful Response
The response is of type any.

